import React, { Component } from "react";

import Search from "./components/Search"
import List from "./components/List"
import './App.css'

export default class App extends Component {
  state = {
    users: [],
    err: '',
    isFirst: true,
    isLoading: false
  }

  updateAppState = (state)=>{
    this.setState(state)
  }

  render() {
    return (
      <div className="container">
        <Search updateAppState={this.updateAppState}/>
        <List {...this.state}/>
      </div>
    );
  }
}
